package com.founder.ivrapi.modular.controller;

import com.founder.ivrapi.modular.service.CtiCdrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * cti_cdr控制类
 */
@RestController
@RequestMapping("/cti_cdr")
public class CtiCdrController {
	@Autowired
	private CtiCdrService ctiCdrService;

	@RequestMapping("/is_caller_in_24_hour/{caller}/{called}")
	public boolean isCallerIn24Hour(@PathVariable String caller,@PathVariable String called) {
		System.out.println("当前号码："+caller+"，呼叫的号码："+called+"，24小时内返回的是："+this.ctiCdrService.isCallerIn24Hour(caller,called));
		return this.ctiCdrService.isCallerIn24Hour(caller,called);
	}
}
